package com.lxk;

import java.util.List;

/**
 * @author 柳新宽
 * @create 2022-03-31  14:48
 * @describe
 */
public class Cinema {
    //属性
    private Integer cinemaId; //影院编号
    private String cinemaName;//影院名称
    private String cinemaPath;//影院地址
    private List<Studio> studios; //影厅

    @Override
    public String toString() {
        //return 是什么 打印就是什么。
        String studioStr="\t";
        for (Studio studio : studios) {
            studioStr+=studio.toString()+"\n\t";
        }
        return "影院编号=" + cinemaId +
                ", 影院名称='" + cinemaName + '\'' +
                ", 影院地址='" + cinemaPath + '\'' +
                ", 旗下的影厅有：\n" + studioStr;
    }

    //无参构造
    public Cinema() {
    }
    //除了影厅外的有参构造
    public Cinema(Integer cinemaId, String cinemaName, String cinemaPath) {
        this.cinemaId = cinemaId;
        this.cinemaName = cinemaName;
        this.cinemaPath = cinemaPath;
    }
    //全参数的构造方法
    public Cinema(Integer cinemaId, String cinemaName, String cinemaPath, List<Studio> studios) {
        this.cinemaId = cinemaId;
        this.cinemaName = cinemaName;
        this.cinemaPath = cinemaPath;
        this.studios = studios;
    }

    public Integer getCinemaId() {
        return cinemaId;
    }

    public void setCinemaId(Integer cinemaId) {
        this.cinemaId = cinemaId;
    }

    public String getCinemaName() {
        return cinemaName;
    }

    public void setCinemaName(String cinemaName) {
        this.cinemaName = cinemaName;
    }

    public String getCinemaPath() {
        return cinemaPath;
    }

    public void setCinemaPath(String cinemaPath) {
        this.cinemaPath = cinemaPath;
    }

    public List<Studio> getStudios() {
        return studios;
    }

    public void setStudios(List<Studio> studios) {
        this.studios = studios;
    }
}
